package com.example.panpan.impl;

import com.example.panpan.Service.GoodsCategoryService;
import com.example.panpan.dao.GoodsCategoryDao;
import com.example.panpan.domain.GoodsCategoryEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("goodsCategoryServiceImpl")
public class GoodsCategoryServiceImpl implements GoodsCategoryService {

    @Autowired
    private GoodsCategoryDao goodsCategoryDao;

    @Override
    public List<GoodsCategoryEntity> goodsCategoryList(int pageSize, int start, String categoryId) {
        return goodsCategoryDao.goodsCategoryList(pageSize, start, categoryId);
    }

    @Override
    public Integer goodsCategorySize(int pageSize, int start, String categoryId) {
        return goodsCategoryDao.goodsCategorySize(pageSize, start, categoryId);
    }

    @Override
    public void insertGoodsCategory(GoodsCategoryEntity goodsCategoryEntity) {
        goodsCategoryDao.insertGoodsCategory(goodsCategoryEntity);
    }

    @Override
    public void updateGoodsCategory(GoodsCategoryEntity goodsCategoryEntity) {
        goodsCategoryDao.updateGoodsCategory(goodsCategoryEntity);
    }

    @Override
    public void deleteGoodsCategory(List<String> groupId) {
        goodsCategoryDao.deleteGoodsCategory(groupId);
    }

    @Override
    public List<GoodsCategoryEntity> goodsCategoryByParentId(int parentId) {
        return goodsCategoryDao.goodsCategoryByParentId(parentId);
    }

}

